﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace FarmSmartSleep.Common.Infrastructure
{
    public interface IBaseRepository<T> where T : class, new()
    {
        IQueryable<T> GetAll();
        int Add(T entity);
        int Update(T entity);
        T GetById(int id);
        Task<int> AddAsync(T entity);
        Task<int> UpdateAsync(T entity);
        Task<int> AddRange(List<T> entitys);
        int UpdateRange(List<T> entitys);
    }
}
